﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Crgd.UAuthServer.Sdk
{
    public interface IIdentotyManager
    {
        /// <summary>
        /// 登录并签发凭据
        /// </summary>
        /// <param name="identity"></param>
        /// <returns></returns>
        Task<string> SignIn(UAuthIdentity identity);

        /// <summary>
        /// 获取当前身份
        /// </summary>
        /// <returns></returns>
        Task<UAuthIdentity> GetCurrentIdentity();

        /// <summary>
        /// 签出并无效化凭据
        /// </summary>
        /// <returns></returns>
        Task SignOut();
    }
}
